/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package afroschool.beans;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author AUTRES
 */
@Entity
@Table(name = "filiere")
@NamedQueries({@NamedQuery(name = "Filiere.findByIdFiliere", query = "SELECT f FROM Filiere f WHERE f.idFiliere = :idFiliere"), @NamedQuery(name = "Filiere.findByEtacode", query = "SELECT f FROM Filiere f WHERE f.etacode = :etacode"), @NamedQuery(name = "Filiere.findByCode", query = "SELECT f FROM Filiere f WHERE f.code = :code"), @NamedQuery(name = "Filiere.findByIntitule", query = "SELECT f FROM Filiere f WHERE f.intitule = :intitule")})
public class Filiere implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "idFiliere", nullable = false)
    private Integer idFiliere;
    @Column(name = "Eta_code")
    private String etacode;
    @Column(name = "code")
    private String code;
    @Column(name = "intitule")
    private String intitule;

    public Filiere() {
    }

    public Filiere(Integer idFiliere) {
        this.idFiliere = idFiliere;
    }

    public Integer getIdFiliere() {
        return idFiliere;
    }

    public void setIdFiliere(Integer idFiliere) {
        this.idFiliere = idFiliere;
    }

    public String getEtacode() {
        return etacode;
    }

    public void setEtacode(String etacode) {
        this.etacode = etacode;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getIntitule() {
        return intitule;
    }

    public void setIntitule(String intitule) {
        this.intitule = intitule;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idFiliere != null ? idFiliere.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Filiere)) {
            return false;
        }
        Filiere other = (Filiere) object;
        if ((this.idFiliere == null && other.idFiliere != null) || (this.idFiliere != null && !this.idFiliere.equals(other.idFiliere))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "afroschool.beans.Filiere[idFiliere=" + idFiliere + "]";
    }

}
